package com.study.demo;

public class MovieOperator {
    private Movie[] movies;
    public MovieOperator(Movie[] movies){
        this.movies=movies;
    }
    public void showMovies(){
        for (int i = 0; i < movies.length; i++) {
            System.out.println("["+movies[i].getId()+","+movies[i].getName()+","+movies[i].getPrice()+","
                              +movies[i].getActor()+","+"]");
        }
    }
    public void showById(int input){
        int id = input - 1;
        System.out.println("["+movies[id].getId()+","+movies[id].getName()+","+movies[id].getPrice()+","
                +movies[id].getActor()+","+"]");
    }
}
